package com.jujia.tmall.base;

public class DoubleClickUtil {
    private static long lastClickTime;
    private static long lastRefreshTime;

    public static boolean check() {
        long time = System.currentTimeMillis();
        long timeD = time - lastClickTime;
        if (0 < timeD && timeD < 1000) {
            return true;
        } else {
            lastClickTime = time;
            return false;
        }

    }

    public static boolean isFastRefreshChat() {
        long time = System.currentTimeMillis();
        long timeD = time - lastRefreshTime;
        if (0 < timeD && timeD < 1000) {
            return true;
        } else {
            lastRefreshTime = time;
            return false;
        }

    }

}
